package com.briup.cms.service.impl;

import com.briup.cms.bean.BaseRole;
import com.briup.cms.bean.Carousel;
import com.briup.cms.bean.Category;
import com.briup.cms.dao.BaseRoleMapper;
import com.briup.cms.dao.extend.BaseRoleExtendMapper;
import com.briup.cms.exception.CustomerException;
import com.briup.cms.service.IBaseRoleService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class BaseRoleServiceImpl implements IBaseRoleService {

    @Autowired
    private BaseRoleMapper baseRoleMapper;

    @Autowired
    private BaseRoleExtendMapper baseRoleExtendMapper;



    @Override
    public List<BaseRole> findAll() {
        List<BaseRole> list = baseRoleExtendMapper.findAll();
        return list;
    }

    @Override
    public BaseRole selectByPrimaryKey(int id) {

        return baseRoleMapper.selectByPrimaryKey(id);
    }

    @Override
    public void insert(BaseRole record) {
        baseRoleMapper.insert(record);
    }

    @Override
    public void update(BaseRole record) {
        baseRoleMapper.updateByPrimaryKey(record);
    }

    @Override
    public void delete(Integer id) {
        baseRoleMapper.deleteByPrimaryKey(id);

    }
}
